

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#netif/ppp/ppp_opts.h" class="nav-sub-label">netif/ppp/ppp_opts.h</a>
              </li>
      

              <li>
                <a href="#ppp.h" class="nav-sub-label">ppp.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#PPPOL2TP_H" class="nav-sub-label">PPPOL2TP_H</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_CONTROL_TIMEOUT" class="nav-sub-label">PPPOL2TP_CONTROL_TIMEOUT</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_SLOW_RETRY" class="nav-sub-label">PPPOL2TP_SLOW_RETRY</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MAXSCCRQ" class="nav-sub-label">PPPOL2TP_MAXSCCRQ</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MAXICRQ" class="nav-sub-label">PPPOL2TP_MAXICRQ</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MAXICCN" class="nav-sub-label">PPPOL2TP_MAXICCN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_CONTROL" class="nav-sub-label">PPPOL2TP_HEADERFLAG_CONTROL</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_LENGTH" class="nav-sub-label">PPPOL2TP_HEADERFLAG_LENGTH</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_SEQUENCE" class="nav-sub-label">PPPOL2TP_HEADERFLAG_SEQUENCE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_OFFSET" class="nav-sub-label">PPPOL2TP_HEADERFLAG_OFFSET</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_PRIORITY" class="nav-sub-label">PPPOL2TP_HEADERFLAG_PRIORITY</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_VERSION" class="nav-sub-label">PPPOL2TP_HEADERFLAG_VERSION</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY" class="nav-sub-label">PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN" class="nav-sub-label">PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HEADERFLAG_DATA_MANDATORY" class="nav-sub-label">PPPOL2TP_HEADERFLAG_DATA_MANDATORY</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPHEADERFLAG_MANDATORY" class="nav-sub-label">PPPOL2TP_AVPHEADERFLAG_MANDATORY</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPHEADERFLAG_HIDDEN" class="nav-sub-label">PPPOL2TP_AVPHEADERFLAG_HIDDEN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPHEADERFLAG_LENGTHMASK" class="nav-sub-label">PPPOL2TP_AVPHEADERFLAG_LENGTHMASK</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_MESSAGE" class="nav-sub-label">PPPOL2TP_AVPTYPE_MESSAGE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_SCCRQ" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_SCCRQ</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_SCCRP" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_SCCRP</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_SCCCN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_SCCCN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_STOPCCN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_STOPCCN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_HELLO" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_HELLO</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_OCRQ" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_OCRQ</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_OCRP" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_OCRP</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_OCCN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_OCCN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_ICRQ" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_ICRQ</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_ICRP" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_ICRP</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_ICCN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_ICCN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_CDN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_CDN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_WEN" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_WEN</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_MESSAGETYPE_SLI" class="nav-sub-label">PPPOL2TP_MESSAGETYPE_SLI</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_RESULTCODE" class="nav-sub-label">PPPOL2TP_AVPTYPE_RESULTCODE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_RESULTCODE" class="nav-sub-label">PPPOL2TP_RESULTCODE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_VERSION" class="nav-sub-label">PPPOL2TP_AVPTYPE_VERSION</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_VERSION" class="nav-sub-label">PPPOL2TP_VERSION</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES" class="nav-sub-label">PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_FRAMINGCAPABILITIES" class="nav-sub-label">PPPOL2TP_FRAMINGCAPABILITIES</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_BEARERCAPABILITIES" class="nav-sub-label">PPPOL2TP_AVPTYPE_BEARERCAPABILITIES</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_BEARERCAPABILITIES" class="nav-sub-label">PPPOL2TP_BEARERCAPABILITIES</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_TIEBREAKER" class="nav-sub-label">PPPOL2TP_AVPTYPE_TIEBREAKER</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_HOSTNAME" class="nav-sub-label">PPPOL2TP_AVPTYPE_HOSTNAME</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_HOSTNAME" class="nav-sub-label">PPPOL2TP_HOSTNAME</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_VENDORNAME" class="nav-sub-label">PPPOL2TP_AVPTYPE_VENDORNAME</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_VENDORNAME" class="nav-sub-label">PPPOL2TP_VENDORNAME</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_TUNNELID" class="nav-sub-label">PPPOL2TP_AVPTYPE_TUNNELID</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE" class="nav-sub-label">PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_RECEIVEWINDOWSIZE" class="nav-sub-label">PPPOL2TP_RECEIVEWINDOWSIZE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_CHALLENGE" class="nav-sub-label">PPPOL2TP_AVPTYPE_CHALLENGE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_CAUSECODE" class="nav-sub-label">PPPOL2TP_AVPTYPE_CAUSECODE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_CHALLENGERESPONSE" class="nav-sub-label">PPPOL2TP_AVPTYPE_CHALLENGERESPONSE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE" class="nav-sub-label">PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_SESSIONID" class="nav-sub-label">PPPOL2TP_AVPTYPE_SESSIONID</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_CALLSERIALNUMBER" class="nav-sub-label">PPPOL2TP_AVPTYPE_CALLSERIALNUMBER</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_FRAMINGTYPE" class="nav-sub-label">PPPOL2TP_AVPTYPE_FRAMINGTYPE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_FRAMINGTYPE" class="nav-sub-label">PPPOL2TP_FRAMINGTYPE</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_AVPTYPE_TXCONNECTSPEED" class="nav-sub-label">PPPOL2TP_AVPTYPE_TXCONNECTSPEED</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_TXCONNECTSPEED" class="nav-sub-label">PPPOL2TP_TXCONNECTSPEED</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_STATE_INITIAL" class="nav-sub-label">PPPOL2TP_STATE_INITIAL</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_STATE_SCCRQ_SENT" class="nav-sub-label">PPPOL2TP_STATE_SCCRQ_SENT</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_STATE_ICRQ_SENT" class="nav-sub-label">PPPOL2TP_STATE_ICRQ_SENT</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_STATE_ICCN_SENT" class="nav-sub-label">PPPOL2TP_STATE_ICCN_SENT</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_STATE_DATA" class="nav-sub-label">PPPOL2TP_STATE_DATA</a>
              </li>
      

              <li>
                <a href="#PPPOL2TP_OUTPUT_DATA_HEADER_LEN" class="nav-sub-label">PPPOL2TP_OUTPUT_DATA_HEADER_LEN</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#pppol2tp_create" class="nav-sub-label">pppol2tp_create</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#pppol2tp_pcb" class="nav-sub-label">pppol2tp_pcb</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="netif/ppp/ppp_opts.h"><span>netif/ppp/ppp_opts.h</span></h4>
      <pre class="doc-declare"><code>#include "netif/ppp/ppp_opts.h"
</code></pre>
      <pre class="doc-comment">#include "netif/ppp/ppp_opts.h"
</pre>

      <h4 id="ppp.h"><span>ppp.h</span></h4>
      <pre class="doc-declare"><code>#include "ppp.h"
</code></pre>
      <pre class="doc-comment">#include "ppp.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="PPPOL2TP_H">Marco <span>PPPOL2TP_H</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_CONTROL_TIMEOUT">Marco <span>PPPOL2TP_CONTROL_TIMEOUT</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_CONTROL_TIMEOUT        (5*1000) /* base for quick timeout calculation */
</code></pre>
      <pre class="doc-comment">/* Timeout */</pre>

      <h4 id="PPPOL2TP_SLOW_RETRY">Marco <span>PPPOL2TP_SLOW_RETRY</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_SLOW_RETRY             (60*1000) /* persistent retry interval */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MAXSCCRQ">Marco <span>PPPOL2TP_MAXSCCRQ</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MAXSCCRQ               4        /* retry SCCRQ four times (quickly) */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MAXICRQ">Marco <span>PPPOL2TP_MAXICRQ</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MAXICRQ                4        /* retry IRCQ four times */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MAXICCN">Marco <span>PPPOL2TP_MAXICCN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MAXICCN                4        /* retry ICCN four times */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_CONTROL">Marco <span>PPPOL2TP_HEADERFLAG_CONTROL</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_CONTROL     32768
</code></pre>
      <pre class="doc-comment">/* L2TP header flags */</pre>

      <h4 id="PPPOL2TP_HEADERFLAG_LENGTH">Marco <span>PPPOL2TP_HEADERFLAG_LENGTH</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_LENGTH      16384
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_SEQUENCE">Marco <span>PPPOL2TP_HEADERFLAG_SEQUENCE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_SEQUENCE    2048
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_OFFSET">Marco <span>PPPOL2TP_HEADERFLAG_OFFSET</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_OFFSET      512
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_PRIORITY">Marco <span>PPPOL2TP_HEADERFLAG_PRIORITY</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_PRIORITY    256
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_VERSION">Marco <span>PPPOL2TP_HEADERFLAG_VERSION</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_VERSION     2
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY">Marco <span>PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY    (PPPOL2TP_HEADERFLAG_CONTROL|PPPOL2TP_HEADERFLAG_LENGTH|PPPOL2TP_HEADERFLAG_SEQUENCE|PPPOL2TP_HEADERFLAG_VERSION)
</code></pre>
      <pre class="doc-comment">/* Mandatory bits for control: Control, Length, Sequence, Version 2 */</pre>

      <h4 id="PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN">Marco <span>PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN    (PPPOL2TP_HEADERFLAG_OFFSET|PPPOL2TP_HEADERFLAG_PRIORITY)
</code></pre>
      <pre class="doc-comment">/* Forbidden bits for control: Offset, Priority */</pre>

      <h4 id="PPPOL2TP_HEADERFLAG_DATA_MANDATORY">Marco <span>PPPOL2TP_HEADERFLAG_DATA_MANDATORY</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HEADERFLAG_DATA_MANDATORY       (PPPOL2TP_HEADERFLAG_VERSION)
</code></pre>
      <pre class="doc-comment">/* Mandatory bits for data: Version 2 */</pre>

      <h4 id="PPPOL2TP_AVPHEADERFLAG_MANDATORY">Marco <span>PPPOL2TP_AVPHEADERFLAG_MANDATORY</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPHEADERFLAG_MANDATORY 32768
</code></pre>
      <pre class="doc-comment">/* AVP (Attribute Value Pair) header */</pre>

      <h4 id="PPPOL2TP_AVPHEADERFLAG_HIDDEN">Marco <span>PPPOL2TP_AVPHEADERFLAG_HIDDEN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPHEADERFLAG_HIDDEN    16384
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPHEADERFLAG_LENGTHMASK">Marco <span>PPPOL2TP_AVPHEADERFLAG_LENGTHMASK</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPHEADERFLAG_LENGTHMASK 1023
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_MESSAGE">Marco <span>PPPOL2TP_AVPTYPE_MESSAGE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_MESSAGE     0 /* Message type */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Message type */</pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_SCCRQ">Marco <span>PPPOL2TP_MESSAGETYPE_SCCRQ</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_SCCRQ   1 /* Start Control Connection Request */
</code></pre>
      <pre class="doc-comment">/* Control Connection Management */</pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_SCCRP">Marco <span>PPPOL2TP_MESSAGETYPE_SCCRP</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_SCCRP   2 /* Start Control Connection Reply */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_SCCCN">Marco <span>PPPOL2TP_MESSAGETYPE_SCCCN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_SCCCN   3 /* Start Control Connection Connected */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_STOPCCN">Marco <span>PPPOL2TP_MESSAGETYPE_STOPCCN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_STOPCCN 4 /* Stop Control Connection Notification */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_HELLO">Marco <span>PPPOL2TP_MESSAGETYPE_HELLO</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_HELLO   6 /* Hello */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_OCRQ">Marco <span>PPPOL2TP_MESSAGETYPE_OCRQ</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_OCRQ    7 /* Outgoing Call Request */
</code></pre>
      <pre class="doc-comment">/* Call Management */</pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_OCRP">Marco <span>PPPOL2TP_MESSAGETYPE_OCRP</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_OCRP    8 /* Outgoing Call Reply */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_OCCN">Marco <span>PPPOL2TP_MESSAGETYPE_OCCN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_OCCN    9 /* Outgoing Call Connected */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_ICRQ">Marco <span>PPPOL2TP_MESSAGETYPE_ICRQ</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_ICRQ   10 /* Incoming Call Request */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_ICRP">Marco <span>PPPOL2TP_MESSAGETYPE_ICRP</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_ICRP   11 /* Incoming Call Reply */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_ICCN">Marco <span>PPPOL2TP_MESSAGETYPE_ICCN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_ICCN   12 /* Incoming Call Connected */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_CDN">Marco <span>PPPOL2TP_MESSAGETYPE_CDN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_CDN    14 /* Call Disconnect Notify */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_WEN">Marco <span>PPPOL2TP_MESSAGETYPE_WEN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_WEN    15 /* WAN Error Notify */
</code></pre>
      <pre class="doc-comment">/* Error reporting */</pre>

      <h4 id="PPPOL2TP_MESSAGETYPE_SLI">Marco <span>PPPOL2TP_MESSAGETYPE_SLI</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_MESSAGETYPE_SLI    16 /* Set Link Info */
</code></pre>
      <pre class="doc-comment">/* PPP Session Control */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_RESULTCODE">Marco <span>PPPOL2TP_AVPTYPE_RESULTCODE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_RESULTCODE  1 /* Result code */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Result code */</pre>

      <h4 id="PPPOL2TP_RESULTCODE">Marco <span>PPPOL2TP_RESULTCODE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_RESULTCODE          1 /* General request to clear control connection */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_VERSION">Marco <span>PPPOL2TP_AVPTYPE_VERSION</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_VERSION     2
</code></pre>
      <pre class="doc-comment">/* -- AVP - Protocol version (!= L2TP Header version) */</pre>

      <h4 id="PPPOL2TP_VERSION">Marco <span>PPPOL2TP_VERSION</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_VERSION        256 /* L2TP Protocol version 1, revision 0 */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES">Marco <span>PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES          3 /* Bearer capabilities */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Framing capabilities */</pre>

      <h4 id="PPPOL2TP_FRAMINGCAPABILITIES">Marco <span>PPPOL2TP_FRAMINGCAPABILITIES</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_FRAMINGCAPABILITIES         3 /* Async + Sync framing */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_BEARERCAPABILITIES">Marco <span>PPPOL2TP_AVPTYPE_BEARERCAPABILITIES</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_BEARERCAPABILITIES          4 /* Bearer capabilities */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Bearer capabilities */</pre>

      <h4 id="PPPOL2TP_BEARERCAPABILITIES">Marco <span>PPPOL2TP_BEARERCAPABILITIES</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_BEARERCAPABILITIES         3 /* Analog + Digital Access */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_TIEBREAKER">Marco <span>PPPOL2TP_AVPTYPE_TIEBREAKER</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_TIEBREAKER  5
</code></pre>
      <pre class="doc-comment">/* -- AVP - Tie breaker */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_HOSTNAME">Marco <span>PPPOL2TP_AVPTYPE_HOSTNAME</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_HOSTNAME    7 /* Host name */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Host name */</pre>

      <h4 id="PPPOL2TP_HOSTNAME">Marco <span>PPPOL2TP_HOSTNAME</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_HOSTNAME       "lwIP" /* FIXME: make it configurable */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_VENDORNAME">Marco <span>PPPOL2TP_AVPTYPE_VENDORNAME</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_VENDORNAME  8 /* Vendor name */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Vendor name */</pre>

      <h4 id="PPPOL2TP_VENDORNAME">Marco <span>PPPOL2TP_VENDORNAME</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_VENDORNAME     "lwIP" /* FIXME: make it configurable */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_TUNNELID">Marco <span>PPPOL2TP_AVPTYPE_TUNNELID</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_TUNNELID    9 /* Assign Tunnel ID */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Assign tunnel ID */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE">Marco <span>PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE 10 /* Receive window size */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Receive window size */</pre>

      <h4 id="PPPOL2TP_RECEIVEWINDOWSIZE">Marco <span>PPPOL2TP_RECEIVEWINDOWSIZE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_RECEIVEWINDOWSIZE          8 /* FIXME: make it configurable */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_CHALLENGE">Marco <span>PPPOL2TP_AVPTYPE_CHALLENGE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_CHALLENGE  11 /* Challenge */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Challenge */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_CAUSECODE">Marco <span>PPPOL2TP_AVPTYPE_CAUSECODE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_CAUSECODE  12 /* Cause code*/
</code></pre>
      <pre class="doc-comment">/* -- AVP - Cause code */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_CHALLENGERESPONSE">Marco <span>PPPOL2TP_AVPTYPE_CHALLENGERESPONSE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE  13 /* Challenge response */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Challenge response */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE">Marco <span>PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE 16
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_SESSIONID">Marco <span>PPPOL2TP_AVPTYPE_SESSIONID</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_SESSIONID  14 /* Assign Session ID */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Assign session ID */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_CALLSERIALNUMBER">Marco <span>PPPOL2TP_AVPTYPE_CALLSERIALNUMBER</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_CALLSERIALNUMBER  15 /* Call Serial Number */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Call serial number */</pre>

      <h4 id="PPPOL2TP_AVPTYPE_FRAMINGTYPE">Marco <span>PPPOL2TP_AVPTYPE_FRAMINGTYPE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_FRAMINGTYPE        19 /* Framing Type */
</code></pre>
      <pre class="doc-comment">/* -- AVP - Framing type */</pre>

      <h4 id="PPPOL2TP_FRAMINGTYPE">Marco <span>PPPOL2TP_FRAMINGTYPE</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_FRAMINGTYPE        1 /* Sync framing */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_AVPTYPE_TXCONNECTSPEED">Marco <span>PPPOL2TP_AVPTYPE_TXCONNECTSPEED</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_AVPTYPE_TXCONNECTSPEED     24 /* TX Connect Speed */
</code></pre>
      <pre class="doc-comment">/* -- AVP - TX Connect Speed */</pre>

      <h4 id="PPPOL2TP_TXCONNECTSPEED">Marco <span>PPPOL2TP_TXCONNECTSPEED</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_TXCONNECTSPEED      100000000 /* Connect speed: 100 Mbits/s */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_STATE_INITIAL">Marco <span>PPPOL2TP_STATE_INITIAL</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_STATE_INITIAL    0
</code></pre>
      <pre class="doc-comment">/* L2TP Session state */</pre>

      <h4 id="PPPOL2TP_STATE_SCCRQ_SENT">Marco <span>PPPOL2TP_STATE_SCCRQ_SENT</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_STATE_SCCRQ_SENT 1
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_STATE_ICRQ_SENT">Marco <span>PPPOL2TP_STATE_ICRQ_SENT</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_STATE_ICRQ_SENT  2
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_STATE_ICCN_SENT">Marco <span>PPPOL2TP_STATE_ICCN_SENT</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_STATE_ICCN_SENT  3
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_STATE_DATA">Marco <span>PPPOL2TP_STATE_DATA</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_STATE_DATA       4
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="PPPOL2TP_OUTPUT_DATA_HEADER_LEN">Marco <span>PPPOL2TP_OUTPUT_DATA_HEADER_LEN</span></h4>
      <pre class="doc-declare"><code>#define PPPOL2TP_OUTPUT_DATA_HEADER_LEN  6 /* Our data header len */
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="pppol2tp_create">Func <span>pppol2tp_create</span></h4>
      <pre class="doc-declare"><code>ppp_pcb *pppol2tp_create(struct netif *pppif,
      struct netif *netif, const ip_addr_t *ipaddr, u16_t port,
      const u8_t *secret, u8_t secret_len,
      ppp_link_status_cb_fn link_status_cb, void *ctx_cb);</code></pre>
      <pre class="doc-comment">/* Create a new L2TP session. */</pre>
      <h3 id="vars">Vars</h3>
      
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="pppol2tp_pcb">Typedef <span>pppol2tp_pcb</span></h4>
      <pre class="doc-declare"><code>typedef struct pppol2tp_pcb_s pppol2tp_pcb;
</code></pre>
      <pre class="doc-comment">/*
 * PPPoL2TP interface control block.
 */</pre>
    </div>
  </body>
</html>
            